<html>
    <head>
        <title>
            图片浏览
        </title>
        <style>
            .img-container{
                margin-top: 40px;
                text-align: center;
            }
            .img-content{
                border: 1px solid #A3A2A3;
                width: 1366px;
            }
            .img-btn{
                margin-top: 30px
            }
        </style>
    </head>
    <body>
        <div class="img-container">
            <img id="image" class="img-content" />
            <div class="img-btn">
                <button onclick="window.close()">点击关闭</button>
            </div>
        </div>
    </body>
</html>

<script>
    function GetQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null)return unescape(r[2]);
        return null;
    };
    var id = GetQueryString("id");
    var ctx = location.pathname.split("/")[1];
    document.getElementById('image').src = location.origin + "/" + ctx + "/fileUpload/getFile.json?fileId=" + id;
</script>